package poi.Info;

import java.io.Serializable;

import poi.Surprise.SurpriseDaysOff;
import poi.Surprise.SurprisePrice;
import poi.Surprise.SurpriseSchedule;

/**
 * This class is used to store all the information about a POI and the Surprise
 * value associated
 * 
 * @author Hernani Costa
 * @version 0.1 date: 29/11/2012
 */

public class POIwithSurprise implements Serializable {
	private static final long serialVersionUID = 1L;
	POI poi;
	SurprisePrice sPrice;
	SurpriseDaysOff sDayOff;
	SurpriseSchedule sSchedule;

	/**
	 * ------------------------------------------------------------------------
	 * Constructor class
	 * ------------------------------------------------------------------------
	 * 
	 * @param poi
	 *            - POI
	 * @param sPrice
	 *            - the value of the Surprise's parameter Price
	 * @param sDayOff
	 *            - the value of the Surprise's parameter DayOff
	 * @param sSchedule
	 *            - the value of the Surprise's parameter Schedule
	 */
	public POIwithSurprise(POI poi, SurprisePrice sPrice,
			SurpriseDaysOff sDayOff, SurpriseSchedule sSchedule) {
		this.poi = poi;
		this.sPrice = sPrice;
		this.sDayOff = sDayOff;
		this.sSchedule = sSchedule;
	}

	// ------------------------------------------------------------------------
	// ------------------------GETs and SETs-----------------------------------
	// ------------------------------------------------------------------------

	public POI getPoi() {
		return poi;
	}

	public SurprisePrice getSurprisePrice() {
		return sPrice;
	}

	public SurpriseDaysOff getSurpriseDayOff() {
		return sDayOff;
	}

	public SurpriseSchedule getSurpriseSchedule() {
		return sSchedule;
	}

	/**
	 * ------------------------------------------------------------------------
	 * Returns a String with all the POI information
	 * ------------------------------------------------------------------------
	 */
	public String to_String() {
		String info = poi.to_String();
		if (sPrice != null)
			info += "\n\t" + sPrice.to_String();
		if (sDayOff != null)
			info += "\n\t" + sDayOff.to_String();
		if (sSchedule != null)
			info += "\n\t" + sSchedule.to_String();
		return info;
	}

}
